<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
loadcache('plugin');
if(!defined('Adz_class')){include('Adz.class.php');}
Adz::auth('alias');//权限判断
if($_POST['save']){
	$save = $_POST['save'];
	$rid = $save['rid'];
	$type = $save['type'];
	if(!submitcheck('save',1)){echo -1;exit;}
	if(CHARSET=='gbk' || CHARSET=='big5'){
		if(function_exists('mb_convert_encoding')){
			$save['alias'] = mb_convert_encoding($save['alias'],CHARSET,'utf-8');
			$save['alias'] = str_replace('?','',$save['alias']);
		}elseif(CHARSET=='gbk'){
			$save['alias'] = iconv('utf-8',CHARSET,$save['alias']);
		}
	}
	$ars = Adz::mysql_save('plugin_alias_bind',$save,array('rid'=>$save['rid'],'type'=>$save['type']));
	print_r($ars);
	exit;
}else{
	exit;
}

?>